package com.hfh.Thread;

public class FirstThread extends Thread{
    public static void main(String[] args) {
        Thread thread = new FirstThread();

        thread.setName("线程一");
        System.out.println(thread.getName());
        System.out.println(Thread.currentThread().getName());


        thread.start();
        System.out.println(thread.isAlive());

    }

    @Override
    public void run() {
        System.out.println("创建线程方式一");
        System.out.println(Thread.currentThread().getName());
    }
}
